<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>宠物博客 - 宠物管理系统</title>
    <style>
        /* General CSS styles */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f3e9e9;
            /* 浅粉色背景 */
        }

        header {
            background-color: #333;
            color: #fff;
            padding: 10px 0;
            text-align: center;
            /* 居中对齐标题内容 */
        }

        header nav ul {
            list-style-type: none;
            margin: 0;
            padding: 0;
            text-align: center;
            /* 居中对齐导航链接 */
        }

        header nav ul li {
            display: inline;
            margin-right: 20px;
        }

        header nav ul li a {
            color: #fff;
            text-decoration: none;
            padding: 10px;
            /* 导航链接的内边距 */
            border-radius: 5px;
            /* 圆角 */
            transition: background-color 0.3s ease;
            /* 背景颜色平滑过渡 */
        }

        header nav ul li a:hover {
            background-color: #fcc;
            /* 鼠标悬停时的浅粉色背景 */
        }


        main {
            max-width: 800px;
            margin: 20px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .post-container {
            background-color: #f9f9f9;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
        }

        .post-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .post-header h2 {
            font-size: 18px;
            color: #0a583c;
        }

        .post-actions {
            display: flex;
            /* Use flexbox for layout */
            justify-content: space-between;
            /* Space items evenly */
            align-items: center;
            /* Center items vertically */
            margin-top: 10px;
            /* Add some top margin */
        }

        .post-actions .like {
            font-size: 30px;
            color: #ccc;
            cursor: pointer;
        }

        .post-actions button {
            padding: 8px 20px;
            background-color: #0a583c;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.3s ease;
        }

        .post-actions button:hover {
            background-color: #0a482c;
        }

        .post-content {
            margin-bottom: 10px;
        }

        .comment {
            background-color: #eaeaea;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }

        .comment-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 5px;
        }

        .comment-header .author {
            font-weight: bold;
            color: #0a583c;
        }

        .comment-actions {
            font-size: 12px;
            color: #888;
        }

        .comment-actions a {
            color: #0a583c;
            text-decoration: none;
            margin-left: 10px;
        }

        .comment-actions a:hover {
            text-decoration: underline;
        }

        .comment-content {
            margin-left: 20px;
        }

        .comment-form {
            margin-top: 20px;
        }

        .comment-form textarea {
            width: 100%;
            padding: 10px;
            font-size: 14px;
            border: 1px solid #ccc;
            border-radius: 5px;
            resize: vertical;
        }

        .comment-form button {
            margin-top: 10px;
            padding: 8px 20px;
            background-color: #0a583c;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.3s ease;
        }

        .comment-form button:hover {
            background-color: #0a482c;
        }
    </style>
</head>

<body>
    <header>
        <nav>
            <ul>
                <li><a href="/">系统首页</a></li>
                <li><a href="/kind">宠物种类知识</a></li>
                <li><a href="/adopt">领养宠物页面</a></li>
                <li><a href="/Adoption">送养宠物页面</a></li>
                <li><a href="/Blogger">宠物博客交流中心</a></li>
                <li><a href="/PersonalCenter">个人中心</a></li>
            </ul>
        </nav>
    </header>
    <main>
        <div class="post-container">
            <div class="post-header">
                <h2>今天和我的宠物一起去公园</h2>
                <div class="post-actions">
                    <span>2024-06-15</span>
                    <span>作者: John Doe</span>
                </div>
            </div>
            <div class="post-content">
                <p>今天天气非常好，我带着我的宠物小白去了公园。小白非常开心，喜欢在草地上奔跑。</p>
            </div>
            <div class="post-actions">
                <p class="like">&#10084;</p>
                <button onclick="changeImage()">回复</button>
            </div>
            <div class="comments-section">
                <div class="comment">
                    <div class="comment-header">
                        <div class="author">Alice</div>
                        <div class="comment-actions">
                            <span>2024-06-15</span>
                            <a href="#">回复</a>
                        </div>
                    </div>
                    <div class="comment-content">
                        <p>小白看起来很可爱！希望下次我也能和我的宠物一起去公园。</p>
                    </div>
                </div>
                <div class="comment">
                    <div class="comment-header">
                        <div class="author">Bob</div>
                        <div class="comment-actions">
                            <span>2024-06-15</span>
                            <a href="#">回复</a>
                        </div>
                    </div>
                    <div class="comment-content">
                        <p>小白一定很享受这样的时光！宠物和主人在一起的时候总是很快乐。</p>
                    </div>
                </div>
                <!-- More comments can be added -->
            </div>
            <div class="comment-form" id="commentForm" style="display: none;">
                <textarea rows="4" placeholder="发表评论..."></textarea>
                <button onclick="postComment()">发布评论</button>
            </div>
        </div>
    </main>
    <footer>
        <!-- Footer content -->
    </footer>
    <script typet="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
    <script>
        document.addEventListener("DOMContentLoaded", function () {
            var links = document.querySelectorAll("header nav ul li a");
            links.forEach(function (link) {
                link.addEventListener("click", function (event) {
                    event.preventDefault();
                    var targetPage = this.getAttribute("href");
                    window.location.href = targetPage;
                });
            });
        });

        $(function () {
            $(".like").click(function () {
                $(this).toggleClass('cs');
            })
        })
        function changeImage() {
            var image = document.querySelector('img');
            image.src = '3.jpg';
        }

        function postComment() {
            var comment = document.querySelector('textarea').value;
            // Send the comment to the server or perform necessary actions
            console.log('Comment posted:', comment);
        }
    </script>
</body>

</html>